package com.ctop.evoa.webservice.service.impl;

import com.ctop.evoa.webservice.domain.Department;
import com.ctop.evoa.webservice.service.DepartmentService;
import org.springframework.stereotype.Component;

import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author : zhuwl
 * @Description : description
 * @Date Created by 下午 4:48 on 2018/2/22 0022.
 */
@Component
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class DepartmentServiceImpl implements DepartmentService {
    private Map<String, Department> map = new HashMap<>();

    public DepartmentServiceImpl() {
        System.out.println("向实体类插入数据");
        Department d = new Department();
        d.setDepartMentId("36");
        d.setDepartMentName("36部门");
        d.setUpdateTime(new Date());

        map.put(d.getDepartMentId(), d);

    }

    public String getName(String id) {
        return "name" + id;
    }

    @Override
    public Department getDepartment(String id) {
        return map.get(id);
    }
}
